home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 29 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  949 b 

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Header Includes
  5. Date: 1 Jan 1996 03:03:18 GMT
  6. Organization: Pipeline USA
  7. Message-ID: <4c7itm$4ld@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe7.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Jan 01, 1996 02:07:11 in article <Header Includes>, 'mckebp@cris.com
  15. (Rasta Mon)' wrote: 
  16.  
  17.  
  18. >    On a lot of my header includes, the headers refer to other headers, 
  19. >and I find that sometimes I'm getting the same one referred to several 
  20. >times when compiling.  I think that if I compiled with each referred 
  21. >header individually, the program realizes its mistake, but, during 
  22. >compilation, there is the repetition. 
  23.  
  24. The common way is: 
  25.  
  26. - - - -  file foo.h - - - - - - 
  27.  
  28. #if !defined(_foo_h_) 
  29. #define _foo_h_ 
  30.  
  31. .. declarations.... 
  32.  
  33. #endif 
  34.  
  35.  
  36. -- 
  37.  
  38. Pete
  39.